package com.fowo.api.model.purchase.plans.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.common.validator.EnumsString;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 采购计划子表 导入导出辅助模型 */
@Getter
@Setter
public class PurchasePlansProductExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属采购计划")
  private String parentPurchasePlansPpgSn;

  @ExcelIgnore
  @ExcelProperty(value = "所属采购计划")
  private Long parentPurchasePlans;

  @Size(max = 50, message = "计划编号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "计划编号")
  private String planSn;

  @Size(max = 500, message = "图片长度不能超过20")
  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> picUrl;

  @NotNull(message = "产品不能为空")
  @Size(max = 50, message = "产品长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*产品")
  private String productName;

  @ExcelIgnore
  @ExcelProperty(value = "*产品")
  private Long product;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "店铺")
  private String sidShopName;

  @ExcelIgnore
  @ExcelProperty(value = "店铺")
  private Long sid;

  @Size(max = 50, message = "国家长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "国家")
  private String marketplace;

  @Size(max = 50, message = "FNSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "FNSKU")
  private String fnskuFnsku;

  @ExcelIgnore
  @ExcelProperty(value = "FNSKU")
  private Long fnsku;

  @Size(max = 50, message = "MSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "MSKU")
  private String msku;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "供应商")
  private String supplierIdSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "供应商")
  private Long supplierId;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "仓库")
  private String widName;

  @ExcelIgnore
  @ExcelProperty(value = "仓库")
  private Long wid;

  @Size(max = 50, message = "单箱数量长度不能超过20")
  @ExcelProperty(value = "单箱数量")
  private Integer cgBoxPcs;

  @Size(max = 50, message = "箱数长度不能超过20")
  @ExcelProperty(value = "箱数")
  private Integer cgBoxNum;

  @NotNull(message = "计划采购量不能为空")
  @ExcelProperty(value = "*计划采购量")
  private Integer quantityPlan;

  @ExcelProperty(value = "建议采购量")
  private Integer quantitySuggestion;

  @ExcelProperty(value = "已采购量")
  private Integer quantityPurchased;

  @Size(max = 50, message = "可用量长度不能超过20")
  @ExcelProperty(value = "可用量")
  private Integer quantityAvailable;

  @Size(max = 50, message = "待检待上架量长度不能超过20")
  @ExcelProperty(value = "待检待上架量")
  private Integer quantityTest;

  @Size(max = 50, message = "待到货量长度不能超过20")
  @ExcelProperty(value = "待到货量")
  private Integer quantityAog;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "期望到货时间")
  private java.util.Date expectArriveTime;

  @Size(max = 50, message = "采购员长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员")
  private String cgUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员")
  private Long cgUid;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;

  @EnumsString(
    value = { "待采购", "已完成", "已驳回", "已作废", "待审批", "待提交" },
    message = "状态的可用值为 “待采购”, “已完成”, “已驳回”, “已作废”, “待审批”, “待提交” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String status;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "开始销售日期")
  private java.util.Date startSalesDate;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "结束销售日期")
  private java.util.Date endSalesDate;

  @Size(max = 50, message = "同期销量长度不能超过20")
  @ExcelProperty(value = "同期销量")
  private Long sameSales;
}
